Optimal. Leaf size=102 \[ -\frac{e^{2 i a} 2^{-\frac{1}{n}-2} x \left (-i b x^n\right )^{-1/n} \text{Gamma}\left (\frac{1}{n},-2 i b x^n\right )}{n}-\frac{e^{-2 i a} 2^{-\frac{1}{n}-2} x \left (i b x^n\right )^{-1/n} \text{Gamma}\left (\frac{1}{n},2 i b x^n\right )}{n}+\frac{x}{2} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0690008, antiderivative size = 102, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 3, integrand size = 10, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.3, Rules used = {3368, 3366, 2208} \[ -\frac{e^{2 i a} 2^{-\frac{1}{n}-2} x \left (-i b x^n\right )^{-1/n} \text{Gamma}\left (\frac{1}{n},-2 i b x^n\right )}{n}-\frac{e^{-2 i a} 2^{-\frac{1}{n}-2} x \left (i b x^n\right )^{-1/n} \text{Gamma}\left (\frac{1}{n},2 i b x^n\right )}{n}+\frac{x}{2} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3368
Rule 3366
Rule 2208
Rubi steps
\begin{align*} \int \cos ^2\left (a+b x^n\right ) \, dx &=\int \left (\frac{1}{2}+\frac{1}{2} \cos \left (2 a+2 b x^n\right )\right ) \, dx\\ &=\frac{x}{2}+\frac{1}{2} \int \cos \left (2 a+2 b x^n\right ) \, dx\\ &=\frac{x}{2}+\frac{1}{4} \int e^{-2 i a-2 i b x^n} \, dx+\frac{1}{4} \int e^{2 i a+2 i b x^n} \, dx\\ &=\frac{x}{2}-\frac{2^{-2-\frac{1}{n}} e^{2 i a} x \left (-i b x^n\right )^{-1/n} \Gamma \left (\frac{1}{n},-2 i b x^n\right )}{n}-\frac{2^{-2-\frac{1}{n}} e^{-2 i a} x \left (i b x^n\right )^{-1/n} \Gamma \left (\frac{1}{n},2 i b x^n\right )}{n}\\ \end{align*}
Mathematica [A] time = 0.246937, size = 94, normalized size = 0.92 \[ -\frac{x \left (e^{2 i a} 2^{-1/n} \left (-i b x^n\right )^{-1/n} \text{Gamma}\left (\frac{1}{n},-2 i b x^n\right )+e^{-2 i a} 2^{-1/n} \left (i b x^n\right )^{-1/n} \text{Gamma}\left (\frac{1}{n},2 i b x^n\right )-2 n\right )}{4 n} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F] time = 0.165, size = 0, normalized size = 0. \begin{align*} \int \left ( \cos \left ( a+b{x}^{n} \right ) \right ) ^{2}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \begin{align*} \frac{1}{2} \, x + \frac{1}{2} \, \int \cos \left (2 \, b x^{n} + 2 \, a\right )\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F] time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (\cos \left (b x^{n} + a\right )^{2}, x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \cos ^{2}{\left (a + b x^{n} \right )}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \cos \left (b x^{n} + a\right )^{2}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]